﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace AspNetCoreWebApiRoute.Filter
{
    public class MyActionFilterxx : IActionFilter
    {
        public ILogger<MyActionFilterAttribute> logger { get; set; }

        public MyActionFilterxx()
        {

        }

        //public MyActionFilterxx(ILogger<MyActionFilterAttribute> logger)
        //{
        //    this.logger = logger;
        //}

        public void OnActionExecuted(ActionExecutedContext context)
        {
            Console.WriteLine("执行过滤器之后");
        }

        public void OnActionExecuting(ActionExecutingContext context)
        {
            Console.WriteLine("执行过滤器之前");
        }
    }
}
